<?php

namespace App\Http\Controllers\YApi;

//use Illuminate\Http\Request;
use Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use Session;
use Redirect;

use App\Models\UsersReg;
use App\Models\UsersAttrib;

class UserlistController extends Controller
{

    public function userlist()
    {
        //会员列表
        $users = UsersReg::limit(1000)->orderBy('reg_time', 'desc')->paginate(15);
        foreach($users as $user)
        {
            //为了得到签名的信息
            $user['attrib'] = UsersAttrib::where('uid', $user->uid)->first();
        }

        return $users;
    }
    
}